negotiator.utility
Class EvaluatorObjective

java.lang.Object
  extended by negotiator.utility.EvaluatorObjective
All Implemented Interfaces:
Evaluator

public class EvaluatorObjective
extends java.lang.Object
implements Evaluator

Evaulator for an objective. In the current implementation it makes no sense to create this type of object.


Constructor Summary
EvaluatorObjective()
          Creates a new evaluator for an objective with a zero weight.
EvaluatorObjective(EvaluatorObjective e)
          Copies the data from the given EvaluatorObjective.
 
Method Summary
 EvaluatorObjective clone()
           
 java.lang.Double getEvaluation(UtilitySpace uspace, Bid bid, int index)
          This method returns the utility of the value of an issue.
 boolean getHasWeight()
           
 EVALUATORTYPE getType()
           
 double getWeight()
           
 java.lang.String isComplete(Objective whichobj)
          Check whether the evaluator has enough information to make an evaluation.
 void loadFromXML(SimpleElement pRoot)
          Method to
 void lockWeight()
          Locks the weight of this Evaluator.
 void setHasWeight(boolean doesHaveWeight)
           
 void setWeight(double wt)
          Sets the weigth with which an Objective or Issue is evaluated.
 SimpleElement setXML(SimpleElement evalObj)
          Sets weights and evaluator properties for the object in SimpleElement representation that is passed to it.
 void unlockWeight()
          Unlock the weight of this evaluator.
 boolean weightLocked()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EvaluatorObjective

public EvaluatorObjective()
Creates a new evaluator for an objective with a zero weight.


EvaluatorObjective

public EvaluatorObjective(EvaluatorObjective e)
Copies the data from the given EvaluatorObjective.

Parameters:
e - other EvaluatorObjective
Method Detail

clone

public EvaluatorObjective clone()
Specified by:
clone in interface Evaluator
Overrides:
clone in class java.lang.Object
Returns:
clone of the current object.

getWeight

public double getWeight()
Specified by:
getWeight in interface Evaluator
Returns:
the weight associated with this

setWeight

public void setWeight(double wt)
Description copied from interface: Evaluator
Sets the weigth with which an Objective or Issue is evaluated.

Specified by:
setWeight in interface Evaluator
Parameters:
wt - The new weight.

lockWeight

public void lockWeight()
Locks the weight of this Evaluator.

Specified by:
lockWeight in interface Evaluator

unlockWeight

public void unlockWeight()
Unlock the weight of this evaluator.

Specified by:
unlockWeight in interface Evaluator

setHasWeight

public void setHasWeight(boolean doesHaveWeight)
Parameters:
doesHaveWeight - signals that this objective has a weight.

getHasWeight

public boolean getHasWeight()
Returns:
true if objective has a weight.

weightLocked

public boolean weightLocked()
Specified by:
weightLocked in interface Evaluator
Returns:
The state of the weightlock.

getEvaluation

public java.lang.Double getEvaluation(UtilitySpace uspace,
                                      Bid bid,
                                      int index)
Description copied from interface: Evaluator
This method returns the utility of the value of an issue. Note that the value is not multiplied by the issue weight, and is therefore non-normalized.

Specified by:
getEvaluation in interface Evaluator
Parameters:
uspace - preference profile
bid - in which the value is contained.
index - of the issue in the bid.
Returns:
utility of the value for an issue, not normalized by the issue weight.

getType

public EVALUATORTYPE getType()
Specified by:
getType in interface Evaluator
Returns:
type of evaluation function, for example EVALUATORTYPE.LINEAR.

loadFromXML

public void loadFromXML(SimpleElement pRoot)
Description copied from interface: Evaluator
Method to

Specified by:
loadFromXML in interface Evaluator

setXML

public SimpleElement setXML(SimpleElement evalObj)
Sets weights and evaluator properties for the object in SimpleElement representation that is passed to it.

Parameters:
evalObj - The object of which to set the evaluation properties.
Returns:
The modified simpleElement with all evaluator properties set.

isComplete

public java.lang.String isComplete(Objective whichobj)
Description copied from interface: Evaluator
Check whether the evaluator has enough information to make an evaluation.

Specified by:
isComplete in interface Evaluator
Parameters:
whichobj - is the objective/issue to which this evaluator is attached.
Returns:
String describing lacking component, or null if the evaluator is complete.